const koa = require("koa");
const router = require("koa-router")();

const main = require("./model/app");

const app = new koa();
router.get("/", async ctx => {
    ctx.set("Access-Control-Allow-Origin","*")
    var result = await main();
    ctx.body = {
        code: 200,
        result
    }
})
app.use(router.routes());
app.listen(8080);